<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>QUnit LoadHide</title>
    <link rel="stylesheet" href="resources/qunit.css" />
  </head>

  <body>
    <div id="qunit"></div>
    <div id="qunit-fixture">
      <div class="iframe-wrapper" style="width:600px;">
        <iframe
          src="resources/frame.content.html"
          width="100%"
          scrolling="no"
        ></iframe>
      </div>
    </div>
    <script src="resources/qunit.js"></script>
    <script src="resources/jquery.js"></script>
    <script src="../src/iframeResizer.js"></script>
    <script src="../js/ie8.polyfils.min.js"></script>
    <script>
      'use strict'
      var receivedIframeIds = []
      asyncTest('postMessage Response', function() {
        iFrameResize({
          //log:true,
          bodyBackground: 'wheat',
          heightCalculationMethod: 'max',
          onInit: function(iframe) {
            ok(true, 'Receive init message back from iFrame.')
            receivedIframeIds.push(iframe.id)
            if (receivedIframeIds.length === 2) {
              ok(
                receivedIframeIds.indexOf('iFrameResizer0') > -1,
                'iFrame id = iFrameResizer0 is present.'
              )
              ok(
                receivedIframeIds.indexOf('iFrameResizer1') > -1,
                'iFrame id = iFrameResizer1 is present.'
              )
            } else {
              start()
            }
          }
        })
      })
    </script>
  </body>
</html>
